package ua.kpi_java_training.zabrodskyi.module2;

/**
 * @author Maksym Zabrodskyi
 * @version 10-Jun-2013
 */
public class ObjectInPool {

    private final int DEFAULT_X = 0;
    private final int DEFAULT_Y = 0;
    private Position position;

    public ObjectInPool() {
        position = new Position(DEFAULT_X, DEFAULT_Y);
    }

    public ObjectInPool(Position position) {
        this.position = new Position(position);
    }

    public Position getPosition() {
        return position;
    }

    public void setPosition(Position position) {
        this.position = new Position(position);
    }

    @Override
    public boolean equals(Object object) {
        return object instanceof Object;
    }

    @Override
    public String toString() {
        return String.format("This object is in position %s", position);
    }

}
